//
//  editInfoCell.m
//  FreeTime
//
//  Created by 王江华 on 16/8/30.
//  Copyright © 2016年 SRDZ.com. All rights reserved.
//

#import "editInfoCell.h"
#import "Header.h"

@implementation editInfoCell

+(instancetype)cellWithTableView:(UITableView *)tableView{

    static  NSString *cellId=@"editInfoCellId";
    editInfoCell *cell=[tableView  dequeueReusableCellWithIdentifier:cellId];
    
    if (cell==nil) {
        cell=[[editInfoCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId];
        
    }
    return cell;
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    self.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
    
    self.selectionStyle=UITableViewCellSelectionStyleNone;
    
    if (self) {
    
        _propertyLabel=[[UILabel alloc]init];
        _propertyLabel.font=[UIFont systemFontOfSize:14];
        
        _infoLabel=[[UILabel alloc]init];
        
        _infoLabel.font=[UIFont systemFontOfSize:14];
        
        _lineView=[[UIView alloc]init];
        
        _lineView.backgroundColor=[ImageUtil colorWithRgb:0xe6e6e6];
        
        [self.contentView  addSubview:_propertyLabel];
        [self.contentView  addSubview:_lineView];
        
    }
    
    return self;
}
-(void)layoutSubviews{
    
    
    [super layoutSubviews];

    _propertyLabel.frame=CGRectMake(10, 5, 120, 15);
    

    _propertyLabel.centerY=self.contentView.centerY;
    
    
    [_infoLabel sizeToFit];
    
    _infoLabel.frame=CGRectMake(WindowWidth/2, 5, _infoLabel.frame.size.width, 15);
    
    
    _lineView.frame=CGRectMake(0, self.contentView.frame.size.height-2, WindowWidth, 1);
    
}


@end
